// NetTestDlg.h : header file
//

#pragma once
#include "afxcmn.h"

#define MAX_COUNT 256

// CNetTestDlg dialog
class CNetTestDlg : public CDialog
{
// Construction
public:
	CNetTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_NetTest_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

public:
	void Initialize();
	void UnInitialize();

public:
	static BOOL CALLBACK RealDataCallBack(void *pBufferData, UINT32 nBufSize, UINT32 nContext, void *pContext);
	 BOOL RealData(void *pBufferData, UINT32 nBufSize, UINT32 nContext);

public:
	void ReStart(UINT32 nPeer);

public:
	HANDLE m_hLogin;
	HANDLE m_hRealStream[MAX_COUNT];
	UINT32 m_nRecvDataSize[MAX_COUNT];
	UINT32 m_nReStartTimes[MAX_COUNT];

public:
	UINT32     m_nStartCount;
	UINT32     m_nSelectPeer;
	CListCtrl  m_ListData;
	CImageList m_ImageList; 


//#define dkq_write_264
#ifdef dkq_write_264
	FILE *m_h264;
#endif

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL DestroyWindow();
	afx_msg void OnBnClickedBtnLogin();
	afx_msg void OnBnClickedBtnLogout();
	afx_msg void OnBnClickedBtnStartplaystram();
	afx_msg void OnBnClickedBtnStopplaystream();

	afx_msg LRESULT OnUserMsg(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnListDataMsg(WPARAM wParam, LPARAM lParam);
	
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnBnClickedCheckRestart();
};
